﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YG.CommonFuncs;

namespace YG.Code
{
    class Program
    {
        static void Main(string[] args)
        {
            string url = "http://api.guyang.site/api/testping";//

            string testPingRespValue = YG.CommonFuncs.HttpClient.PostUrl(url, Class2Json.ToJSON(new TestPingReq { pcname = "mycomputer" }));
            TestPingResp testPingResp = Class2Json.ToClass<TestPingResp>(testPingRespValue);

            Console.WriteLine(testPingRespValue);
        }

    }
    public class TestPingReq
    {
        public string pcname { get; set; }
    }
    public class TestPingResp
    {
        public YG.CommonFuncs.APIStatus apistatus { get; set; }
    }
}
